package com.jinsi.service.yrf.iml;
import com.jinsi.mapper.yrf.CustomerServiceManagementMapper;
import com.jinsi.pojo.CustomerServiceManagement;
import com.jinsi.service.yrf.CustomerServiceManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CustomerServiceManagementServiceImpl implements CustomerServiceManagementService {
    @Autowired
    private CustomerServiceManagementMapper customerServiceManagementMapper;

    @Override
    public List<CustomerServiceManagement> getAll() {
        return customerServiceManagementMapper.getAll();
    }

    @Override
    public void cusdelete(int cusSerId) throws Exception {
        int num = customerServiceManagementMapper.cusdelete(cusSerId);
        if(num == 0){
            throw new Exception();
        }
    }
}
